package team.future.joke.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import team.future.joke.util.WebClientUtil;

/**
 * Title: UtilController.java<br>
 * Description: <br>
 * Copyright (c) 未来工作室版权所有 2015    <br>
 * Create DateTime: 2015年9月17日 上午9:37:58 <br>
 * @author futurezhu
*/
@Controller
public class UtilController {

	@RequestMapping("/joke/util/getIpMac")
	@ResponseBody
	public String jokeDetail(HttpServletRequest request) {
		String ip = WebClientUtil.getRemoteAddress(request);
		String mac = WebClientUtil.getMACAddress(ip);
		return "jcb({'ip':'" + ip + "','mac':'" + mac + "'})";
	}
}
